package com.home.theater.test;

import com.home.theater.Amplifier;
import com.home.theater.CdPlayer;
import com.home.theater.DvdPlayer;
import com.home.theater.PopcornPopper;
import com.home.theater.Projector;
import com.home.theater.Screen;
import com.home.theater.TheaterLights;
import com.home.theater.Tuner;
import com.home.theater.facade.HomeTheaterFacade;

/* The Facade Pattern provides a unified interface to a set of interfaces
 * in a subsystem. Facade defines a higher-level interface that makes
 * the subsystem easier to use.
 * 
 * */

public class HomeTheaterTestDrive {
	public static void main(String[] args) {
		Amplifier amplifier = new Amplifier();
		Tuner tuner = new Tuner();
		DvdPlayer dvdPlayer = new DvdPlayer();
		CdPlayer cdPlayer = new CdPlayer();
		Projector projector = new Projector();
		TheaterLights theaterLights = new TheaterLights();
		Screen screen = new Screen();
		PopcornPopper popcornPopper = new PopcornPopper();
		HomeTheaterFacade homeTheaterFacade = new HomeTheaterFacade(amplifier,
				tuner, dvdPlayer, cdPlayer, projector, theaterLights, screen,
				popcornPopper);
		homeTheaterFacade.watchMovie("The Matrix");
		homeTheaterFacade.endMovie();
	}

}
